import request from "@/request/";

//分页
export const getList = (data) => {
  return request({
    url: "/api/mes-production-service/package-spec/page",
    method: "POST",
    data,
  });
};

//详情
export const getDetail = (data) => {
  return request({
    url: "/api/mes-production-service/assets-brand/detail",
    method: "POST",
    data,
  });
};

//新增
export const add = (data) => {
  console.log(data);
  return request({
    url: "/api/mes-production-service/package-spec/save",
    method: "POST",
    data,
  });
};

//编辑
export const edit = (data) => {
  return request({
    url: "/api/mes-production-service/package-spec/update",
    method: "POST",
    data,
  });
};

//删除
export const remove = (data) => {
  return request({
    url: "/api/mes-production-service/package-spec/delete",
    method: "POST",
    data,
  });
};

//明细分页
export const getDetailList = (data) => {
  return request({
    url: "/api/mes-production-service/package-spec-detail/page",
    method: "POST",
    data,
  });
};

//明细详情
export const getItemDetail = (data) => {
  return request({
    url: "/api/mes-production-service/package-spec-detail/detail",
    method: "POST",
    data,
  });
};

//明细新增
export const detailAdd = (data) => {
  console.log(data);
  return request({
    url: "/api/mes-production-service/package-spec-detail/save",
    method: "POST",
    data,
  });
};

//明细编辑
export const detailEdit = (data) => {
  return request({
    url: "/api/mes-production-service/package-spec-detail/update",
    method: "POST",
    data,
  });
};

//明细删除
export const detailRemove = (data) => {
  return request({
    url: "/api/mes-production-service/package-spec-detail/delete",
    method: "POST",
    data,
  });
};

//关联分页
export const getAssociationList = (data) => {
  return request({
    url: "/api/mes-production-service/package-spec/spec-in-material/page",
    method: "POST",
    data,
  });
};

//关联新增
export const associationAdd = (data) => {
  console.log(data);
  return request({
    url: "/api/mes-production-service/package-spec/spec-in-material/save",
    method: "POST",
    data,
  });
};

//关联删除
export const associationRemove = (data) => {
  return request({
    url: "/api/mes-production-service/package-spec/spec-in-material/delete",
    method: "POST",
    data,
  });
};
